<?php
session_start();
date_default_timezone_set("America/Sao_Paulo");
setlocale(LC_ALL, 'pt_BR');
include "../../config/conexao.php";
include "../../biblioteca/funcao.php";
?>
<html>
    
    <head>
        
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="../../plugin/estilo.css">
        <link rel="stylesheet" type="text/css" href="../../plugin/bootstrap/css/bootstrap-responsive.css">
        <link rel="stylesheet" type="text/css" href="../../plugin/bootstrap/css/bootstrap.css"> 
        <script type="text/javascript" src="../../plugin/jquery-1.7.2.js"></script>
        <script type="text/javascript" src="../../plugin/bootstrap/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="../../plugin/funcao.js" /></script>

        <title>Imprimir</title>
        <link href="../../base/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
            <!--[if lt IE 9]>
            <script src="plugin/html5.js"></script>
        <![endif]-->
        
    </head>
    
    <body onload="window.print();">
        
        <div id="div">
        
            <?php

            $sql = "SELECT cliente.cli_id,
            cliente.cli_code,
            cliente.cli_rtc,
            cliente.cli_guerra,
            cliente.cli_ramal,
            cliente.cli_tf3,
            cliente.cli_tf4,
            cliente.cli_siscomis,
            cliente.cli_rtc,
            cliente.cli_email,
            posto.pos_nome,
            posto.pos_nome2,
            local.loc_nome,
            local.loc_id2,
            cliente.cli_ramo,
            om.om_nome 
            FROM cliente 
            LEFT JOIN posto ON cliente.pos_id=posto.pos_id 
            LEFT JOIN om ON om.om_id=cliente.om_id 
            LEFT JOIN local ON local.loc_id=cliente.loc_id 
            LEFT JOIN cliente_grupo ON cliente.cli_id=cliente_grupo.cli_id
            WHERE cliente.status='1' AND cliente.cli_id<>'1' $onde 
            ORDER BY cliente.cli_code";
            $res = sql($sql);
            $num = mysql_num_rows($res);


            echo "<h4>$t_detahelp <strong>{$linha['cha_id']}</strong><br><br><a href='#' onclick='window.print();' style='font-size:13px;'>Imprimir</a>";
          ?>

                
        </div>
        
    </body>
    
</html>